package com.qfedu.smart_community.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName receivables_management
 */
public class ReceivablesManagement implements Serializable {
    /**
     * 收费项目id
     */
    private Integer payItemsId;

    /**
     * 业主姓名
     */
    private String proprietorName;

    /**
     * 录入时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")
    private Date recordDate;

    /**
     * 录入人
     */
    private String recordPerson;

    /**
     * 审核状态:   0待审核   1已审核
     */
    private String auditStatus;

    /**
     * 审核人
     */
    private String auditPerson;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")
    private Date auditDate;

    //一对一关联属性
    private ProprietorInfo proprietorInfo;

    private PayItems payItems;


    public ProprietorInfo getProprietorInfo() {
        return proprietorInfo;
    }

    public void setProprietorInfo(ProprietorInfo proprietorInfo) {
        this.proprietorInfo = proprietorInfo;
    }

    public PayItems getPayItems() {
        return payItems;
    }

    public void setPayItems(PayItems payItems) {
        this.payItems = payItems;
    }

    private static final long serialVersionUID = 1L;

    /**
     * 收费项目id
     */
    public Integer getPayItemsId() {
        return payItemsId;
    }

    /**
     * 收费项目id
     */
    public void setPayItemsId(Integer payItemsId) {
        this.payItemsId = payItemsId;
    }

    /**
     * 业主姓名
     */
    public String getProprietorName() {
        return proprietorName;
    }

    /**
     * 业主姓名
     */
    public void setProprietorName(String proprietorName) {
        this.proprietorName = proprietorName;
    }

    /**
     * 录入时间
     */
    public Date getRecordDate() {
        return recordDate;
    }

    /**
     * 录入时间
     */
    public void setRecordDate(Date recordDate) {
        this.recordDate = recordDate;
    }

    /**
     * 录入人
     */
    public String getRecordPerson() {
        return recordPerson;
    }

    /**
     * 录入人
     */
    public void setRecordPerson(String recordPerson) {
        this.recordPerson = recordPerson;
    }

    /**
     * 审核状态:   0待审核   1已审核
     */
    public String getAuditStatus() {
        return auditStatus;
    }

    /**
     * 审核状态:   0待审核   1已审核
     */
    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    /**
     * 审核人
     */
    public String getAuditPerson() {
        return auditPerson;
    }

    /**
     * 审核人
     */
    public void setAuditPerson(String auditPerson) {
        this.auditPerson = auditPerson;
    }

    /**
     * 审核时间
     */
    public Date getAuditDate() {
        return auditDate;
    }

    /**
     * 审核时间
     */
    public void setAuditDate(Date auditDate) {
        this.auditDate = auditDate;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ReceivablesManagement other = (ReceivablesManagement) that;
        return (this.getPayItemsId() == null ? other.getPayItemsId() == null : this.getPayItemsId().equals(other.getPayItemsId()))
            && (this.getProprietorName() == null ? other.getProprietorName() == null : this.getProprietorName().equals(other.getProprietorName()))
            && (this.getRecordDate() == null ? other.getRecordDate() == null : this.getRecordDate().equals(other.getRecordDate()))
            && (this.getRecordPerson() == null ? other.getRecordPerson() == null : this.getRecordPerson().equals(other.getRecordPerson()))
            && (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()))
            && (this.getAuditPerson() == null ? other.getAuditPerson() == null : this.getAuditPerson().equals(other.getAuditPerson()))
            && (this.getAuditDate() == null ? other.getAuditDate() == null : this.getAuditDate().equals(other.getAuditDate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPayItemsId() == null) ? 0 : getPayItemsId().hashCode());
        result = prime * result + ((getProprietorName() == null) ? 0 : getProprietorName().hashCode());
        result = prime * result + ((getRecordDate() == null) ? 0 : getRecordDate().hashCode());
        result = prime * result + ((getRecordPerson() == null) ? 0 : getRecordPerson().hashCode());
        result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
        result = prime * result + ((getAuditPerson() == null) ? 0 : getAuditPerson().hashCode());
        result = prime * result + ((getAuditDate() == null) ? 0 : getAuditDate().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", payItemsId=").append(payItemsId);
        sb.append(", proprietorName=").append(proprietorName);
        sb.append(", recordDate=").append(recordDate);
        sb.append(", recordPerson=").append(recordPerson);
        sb.append(", auditStatus=").append(auditStatus);
        sb.append(", auditPerson=").append(auditPerson);
        sb.append(", auditDate=").append(auditDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}